import fetch from '@/utils/fetch'

export function createChart(data) {
  return fetch({
    url: '/bi/biChart/add',
    method: 'POST',
    data
  })
}

export function updateChart(data) {
  return fetch({
    url: '/bi/biChart/edit',
    method: 'PUT',
    data
  })
}

export function getChartById(params) {
  return fetch({
    url: `/bi/biChart/queryById`,
    method: 'GET',
    params
  })
}

export function deleteChart(params) {
  return fetch({
    url: `/bi/biChart/delete`,
    method: 'DELETE',
    params
  })
}

export function chartList() {
  return fetch({
    url: `/bi/biChart/list`
  })
}
